package com.dobby.logger.business.entity;

import org.springframework.jdbc.core.RowMapper;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 业务日志
 * Created by liguoqing on 2016/3/7.
 */
public class BizLog implements Serializable, RowMapper<BizLog> {

    private String id;
    private String companyId;
    private String operatorId;
    private Long operatorType;
    private String operateDate;
    private String content;
    private String applicationId;
    private String moduleId;
    private String ipAddress;
    private boolean visible;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    public Long getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(Long operatorType) {
        this.operatorType = operatorType;
    }

    public String getOperateDate() {
        return operateDate;
    }

    public void setOperateDate(String operateDate) {
        this.operateDate = operateDate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getApplicationId() {
        return applicationId;
    }

    public void setApplicationId(String applicationId) {
        this.applicationId = applicationId;
    }

    public String getModuleId() {
        return moduleId;
    }

    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public boolean isVisible() {
        return visible;
    }

    public void setVisible(boolean visible) {
        this.visible = visible;
    }

    @Override
    public BizLog mapRow(ResultSet rs, int rowNum) throws SQLException {
        BizLog bizLog = new BizLog();
        bizLog.setId(rs.getString("id"));
        bizLog.setCompanyId(rs.getString("company_id"));
        bizLog.setOperatorId(rs.getString("operator_id"));
        bizLog.setOperatorType(rs.getLong("operator_type"));
        bizLog.setOperateDate(rs.getString("operate_date"));
        bizLog.setContent(rs.getString("content"));
        bizLog.setApplicationId(rs.getString("application_id"));
        bizLog.setModuleId(rs.getString("module_id"));
        bizLog.setIpAddress(rs.getString("ip_address"));
        bizLog.setVisible(rs.getBoolean("visible"));
        return bizLog;
    }



}
